package cn.cheniy.swiftmark.common.exception;

import cn.cheniy.swiftmark.common.response.ResponseEnum;

/**
 * @author cheniy
 * @description 自定义异常类型
 *  
 */

public class SwiftMarkException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private Object object;

    private ResponseEnum responseEnum;

    public SwiftMarkException(String msg) {
        super(msg);
    }

    public SwiftMarkException(String msg, Object object) {
        super(msg);
        this.object = object;
    }

    public SwiftMarkException(String msg, Throwable cause) {
        super(msg, cause);
    }


    public SwiftMarkException(ResponseEnum responseEnum) {
        super(responseEnum.getMsg());
        this.responseEnum = responseEnum;
    }

    public SwiftMarkException(ResponseEnum responseEnum, Object object) {
        super(responseEnum.getMsg());
        this.responseEnum = responseEnum;
        this.object = object;
    }


    public Object getObject() {
        return object;
    }

    public ResponseEnum getResponseEnum() {
        return responseEnum;
    }

}
